Dynamically determining cache destage rates for multiple storage arrays

ABSTRACT

A storage controller includes a cache destage controller that determines write cache destage rates for each of a plurality of storage arrays as a function of available system resources. When the available system resources are sufficient to satisfy the optimal destage rates for all arrays, the destage rate for each array is set to its optimal rate. When the available system resources are insufficient to satisfy the array rates of all of the arrays, each array is allocated destage rate that is a percentage of the array rates based on the available resources. When the available system resources are insufficient to satisfy the optimal destage rates for all arrays, but sufficient to satisfy the array rates of some of the arrays, a destage rate is determined for each array based on mathematical relationships between sums of the array rates, global rates, optimal rates, and sums of these across arrays.

BACKGROUND 1. Technical Field

This disclosure generally relates to storage arrays in computer systems,and more specifically relates to allocating cache destage resources fora write cache for multiple storage arrays.

2. Background Art

Storage subsystems for multiple storage arrays, such as multiple arraysof disk drives, have been developed. A Redundant Array of IndependentDisks (RAID) is one specific example of a known type of storagesubsystem that includes multiple storage arrays. A storage subsystem formultiple storage arrays typically includes a write cache. Data for allarrays in a storage subsystem is written to the write cache. A cachedestage controller determines when data is destaged from the cache tothe arrays. Destaging is the process of writing data from the writecache to the arrays. Destaging is an important process in the storagecontroller because destaging at too high a rate consumes more systemresources, increases the utilization of the media, and results in thewrite cache being mostly empty most of the time. Destaging at too low arate results in the write cache filling up and being unable to take morewrite data. The destage rate for the write cache can thus significantlyimpact performance of the storage subsystem.

One known way to set destage rates for a write cache is to provide aminimal rate when the write cache is less than some specified percentagefull, such as 20%, to provide a maximum rate when the write cache isgreater than some specified percentage full, such as 80%, and providinga linear function between the minimum and maximum rates between the twothresholds. Setting the destage rate for the write cache in this mannerdoes not take into account the specific characteristics of theindividual arrays serviced by the write cache, and can thus use excessresources for arrays that don't need those resources, when another arraywould benefit from using those resources instead.

BRIEF SUMMARY

A storage controller includes a cache destage controller that determineswrite cache destage rates for each of a plurality of storage arrays as afunction of available system resources. When the available systemresources are sufficient to satisfy the optimal destage rates for allarrays, the destage rate for each array is set to its optimal rate. Whenthe available system resources are insufficient to satisfy the arrayrates of all of the arrays, each array is allocated destage rate that isa percentage of the array rates based on the available resources. Whenthe available system resources are insufficient to satisfy the optimaldestage rates for all arrays, but sufficient to satisfy the array ratesof some of the arrays, a destage rate is determined for each array basedon mathematical relationships between sums of the array rates, globalrates, optimal rates, and sums of these across arrays. If an array hasvery little data in cache, such that a larger destage rate would beuseless, the array is said to be below a minimum data threshold. Theminimum data threshold is used to otherwise reduce a destage rate to anarray that does not meet the minimum data threshold, thereby reducingthe system resources used by that array and making these systemresources available to other arrays.

The foregoing and other features and advantages will be apparent fromthe following more particular description, as illustrated in theaccompanying drawings.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWING(S)

The disclosure will be described in conjunction with the appendeddrawings, where like designations denote like elements, and:

FIG. 1 is a block diagram of a system that includes a host computersystem that accesses a storage controller that stores data to and readsdata from multiple arrays of storage devices;

FIG. 2 is a flow diagram of a method for setting destage rates for eachof a plurality of storage arrays;

FIG. 3 is a flow diagram of a method that represents one possibleimplementation of step 270 in FIG. 2;

FIG. 4 is a graph showing sums used in the flow diagram in FIG. 3;

FIG. 5 is a graph of a suitable example for four storage arrays whenthere are 200 available hardware resources;

FIG. 6 is a is a graph of a suitable example for four storage arrayswhen there are 100 available hardware resources;

FIG. 7 is a graph of a suitable example for four storage arrays whenthere are 140 available hardware resources; and

FIG. 8 is a graph of a suitable example for four storage arrays whenthere are 165 available hardware resources.

DETAILED DESCRIPTION

The disclosure and claims herein are directed to a storage controllerthat includes a cache destage controller that determines write cachedestage rates for each of a plurality of storage arrays as a function ofavailable system resources. When the available system resources aresufficient to satisfy the optimal destage rates for all arrays, thedestage rate for each array is set to its optimal rate. When theavailable system resources are insufficient to satisfy the array ratesof all of the arrays, each array is allocated destage rate that is apercentage of the array rates based on the available resources. When theavailable system resources are insufficient to satisfy the optimaldestage rates for all arrays, but sufficient to satisfy the array ratesof some of the arrays, a destage rate is determined for each array basedon mathematical relationships between sums of the array rates, globalrates, optimal rates, and sums of these across arrays. If an array hasvery little data in cache, such that a larger destage rate would beuseless, the array is said to be below a minimum data threshold. Theminimum data threshold is used to otherwise reduce a destage rate to anarray that does not meet the minimum data threshold, thereby reducingthe system resources used by that array and making these systemresources available to other arrays.

Referring to FIG. 1, a system 100 includes a host computer system 110that accesses a storage controller 120 that manages storage accesses tomultiple storage arrays, shown in FIG. 1 as Array1 192, Array2 194, . .. , ArrayN 198. The storage controller 120 includes a processor 130 anda cache destage controller 140. Processor 130 may be constructed fromone or more microprocessors and/or integrated circuits. Processor 130executes program instructions stored in main memory and interacts withthe host 110. Cache destage controller 140 includes hardware resources150, a dynamic destage rate tool 160, and a write cache 170. The dynamicdestage rate tool 160 preferably includes a number of dynamic destagerates that have a one-to-one correspondence with the number of arraysbeing serviced by the cache destage controller 140. Thus, when there arefive arrays, the dynamic destage rate tool 160 will have five destagerates, where each destage rate corresponds to one of the five arrays.The destage rates in FIG. 1 are shown as destage rate1 162, destagerate2 164, . . . , destage rateN 168, which correspond to the arrays192, 194, . . . , 198. The write cache 170 is written to by the storagecontroller 120 when data is written by the host 110 to one of the arrays192. The write cache 170 preferably writes to a storage array controller180, which reads data from and writes data to each array. The destagingof data from the write cache 170 can be to the storage array controller180. In the alternative, the storage array controller 180 could beomitted, which means the destaging of data from the write cache 170 willbe directly to the arrays 192, 194, . . . , 198. The storage controller120 may include many other features that are known in the art, but arenot shown in FIG. 1 for the sake of simplicity.

Referring to FIG. 2, a method 200 shows a suitable way to determine andset destage rates for multiple arrays in a storage controller. Walk allarrays and build four sums, namely: Array Sum, Optimal Sum, Desired Sumand Excess Sum (step 210). Components for these sums are showngraphically in FIG. 4 and are discussed in more detail below. Theavailable hardware resources are determined (step 220). The hardwareresources needed for destaging may include, for example, hardwarecontrol blocks, hardware paths, scratchpad space, hardware buffers, etc.For the specific examples discussed herein, we assume the hardwarecontrol blocks are the limiting resource, so the number of hardwarecontrol blocks are considered herein when setting destage rates.

When the available resources are greater than or equal to the optimalsum of resources for all arrays (step 230=YES), the destage rates foreach array will be set to the array's optimal rate (step 240), becausethere are sufficient resources to accommodate all of the optimal ratesfor all arrays. Step 240 represents the best case, when there aresufficient resources to accommodate the optimal destage rates for allarrays. Once the destage rates are set for all arrays to their optimalrates in step 240, data is written from the write cache to the storagearrays using the set destage rates for each array (step 280). Note thatdata is continually being written from the write cache to the storagearrays, and the rate at which the data is written is driven by thedestage rate. The destage rate is altered as circumstances change suchas the amount of data in the cache or the locality of data in the cache.When the available resources are less than the optimal sum (step230=NO), and when the resources are less than the array sum (step250=NO), each destage rate is set to a value of (Resources/ArraySum)*Array Rate. Step 260 represents the worst case, when there areinsufficient resources to accommodate the array rates for each array, sothe destage rate is less than the array rate for each array by the samepercentage. Once the destage rates are set for all arrays in step 260,data is written from the write cache to the storage arrays using the setdestage rates for each array (step 280). When the available resources isgreater than or equal to the array sum (step 250=YES), the destage ratesfor the arrays are set as a function of the available hardware resourcesand defined variables (step 270). Step 270 represents the middle case,when there are not enough resources to provide the optimal rate for allarrays, but there are enough resources to provide the array rate for allarrays. Once the destage rates are set for all arrays in step 270, datais written from the write cache to the storage arrays using the setdestage rates for each array (step 280). Method 200 is then done.

FIG. 3 shows a method 300 that is one suitable implementation for step270 in FIG. 2 within the scope of the disclosure and claims herein. Avariable referred to herein as Remaining Resources is computed bysubtracting the array sum from the total resources (step 310). Avariable referred to herein as Desired Ratio is computed by dividing theRemaining Resources by the Desired Sum, then comparing to the numberone. The Desired Ratio is the lower of the number one or the RemainingResources divided by the Desired Sum (step 312). An array is thenselected (step 314). When the array rate for the selected array is notless than the Global Rate (step 320=NO), the destage rate for theselected array is set to the Array Rate (step 322). The Global Rate is arate that addresses the fullness of the entire write cache. When theArray Rate for the selected array is less than the Global Rate (step320=YES), a determination is made regarding whether the Array data incache is less than a defined Minimum Data Threshold (step 330). When theArray data in cache is less than the Minimum Data Threshold (step330=YES), a variable referred to herein as Array Delta is computed bymultiplying the Array Rate times the Desired Ratio computed in step 312(step 332). When the Array data in cache is not less than the MinimumData Threshold (step 330=NO), the Array Delta variable is computed asthe Global Rate minus the Array Rate, with the difference multiplied bythe Desired Ratio (step 334). When the Desired Sum is less than theTotal Resources less the Array Sum (step 340=YES), and the selectedarray data in cache is less than the Minimum Data Threshold (step342=YES), a variable Array Extra is computed by taking the TotalResources less the Array Sum less the Desired sum, and multiplying thisresult by the Array Extra divided by the Extra Sum (step 350). When theDesired Sum is not less than the Total Resources less the Array Sum(step 340=NO), or when this Array data in cache is not less than theMinimum Data Threshold (step 342=NO), the Array Extra is set to zero(step 344). The Array Destage Rate for the selected array is thencomputed as the Array Rate plus the Array Delta plus the Array Extra(step 360). When there are more arrays to process (step 370=YES), method300 returns to step 314 and continues, until there are no more arrays toprocess (step 370=NO), at which point method 300 is done.

The components from each array for the Array Sum, Optimal Sum, DesiredSum and Excess Sum computed in step 210 in FIG. 2 are representedgraphically in FIG. 4. The Array Sum is the sum of all Array Rates ofall the arrays. The Optimal Sum is the sum of all the Optimal Rates ofall the arrays. The definition of the Desired Sum component depends onwhether the Array Sum is greater or less than the Minimum Data Thresholdshown in FIG. 4. On the left side of FIG. 4, an array which has moredata in cache than the Minimum Data Threshold is shown. When the arraydata in cache is greater than the Minimum Data Threshold, the DesiredSum Component for that array is computed by subtracting the Array Ratefrom the Optimal Rate. On the right side of FIG. 4, an array that hasmore data in cache than the Minimum Data Threshold is shown. Often, whenan array has data in cache less than the Minimum Data Threshold, theArray Rate will be lower. When the Array data in cache is less than theMinimum Data Threshold, as shown on the right side of FIG. 4, theDesired Sum Component for that array is the same as the Array Sum. TheExcess Sum Component is computed by subtracting the Array Sum from theOptimal Sum, as shown on the right side of FIG. 4. Note the Excess SumComponent for an array only exists when the Array data in cache is lessthan the Minimum Data Threshold, as shown on the right side of FIG. 4.

Some examples are now given to illustrate how array destage rates arecomputed under different conditions. Referring to FIG. 5, four arraysare shown with their corresponding Array Rates, Global Rates, OptimalRates and Resulting Array Destage Rates in bar chart form, which werederived from walking the four arrays and computing these variables, asshown in step 210 in FIG. 2. We assume for the example in FIG. 5 thereare 200 available hardware resources, which is determined in step 220 inFIG. 2. The Optimal Sum is computed by adding the Optimal Rates for allarrays. We assume the Optimal Rates are: Array1—40; Array2—60;Array3—40; Array4—40. With these Optimal Rates, the Optimal Sum is 180.Because the available resources are 200 and the Optimal Sum is 180, theavailable resources are greater than the Optimal Sum (step 230=YES), sothe resulting array destage rate for each of the four arrays is set toits corresponding Optimal Rate (step 240). Thus, the resulting arraydestage rate for Array1 is set to 40; the resulting array destage ratefor Array2 is set to 60; the resulting array destage rate for Array3 isset to 40; and the resulting array destage rate for Array4 is set to 40,as shown in the bar graph in FIG. 5. The data in the write cache is thenwritten (or destaged) from the write cache to the four storage arraysusing these four destage rates for the four corresponding arrays (step280). FIG. 5 and step 240 in FIG. 2 illustrate the easy case, when thenumber of resources equals or exceeds the Optimal Sum. The destage ratefor each array can be set to the Optimal Rate for each array becausethere are sufficient resources to do so.

A second case is shown in FIG. 6, with 100 available hardware resources.Step 210 in FIG. 2 thus produces the values shown in FIG. 6, and theavailable hardware resources equals 100 in step 220. The Optimal Sum isthe sum of the four Optimal rates, which are: 40 for Array1; 60 forArray2; 40 for Array3; and 40 for Array4. The Optimal Sum is thus 180,which exceeds the 100 available hardware resources (step 230=N0). TheArray Sum is the sum of the four Array Rates, which are: 15 for Array1;60 for Array2; 10 for Array3; and 30 for Array4. The Array Sum is thus115, which is greater than the available resources (step 250=N0). Thedestage rates for each array are set to the Resources divided by theArray Sum, then multiplied by the Array Rate (step 260). FIG. 6 and step260 show the worst case, when the number of resources cannot satisfy theArray Sum. In this case, each array is allocated the same percentage ofits Array Rate. For the example in FIG. 6, this means the totalresources of 100 is divided by the Array Sum of 115, then multiplied bythe Array Rate for each array. The ratio of total resources to Array Sumis 100/115, or 0.87, which means each resulting array destage rate isset to approximate 87% of the Array Rate. Thus, the resulting arraydestage rates are: 13 for Array1; 52 for Array2; 9 for Array3; and 26for Array4. Because there are insufficient resources to provide theArray Sum, the same percentage of resources multiplied by the Array Rateare allocated to each array in the form of the resulting array destagerate.

FIGS. 7 and 8 show two examples of middle cases that lie between the twoextremes in FIGS. 5 and 6. Each of these cases correspond to step 270 inFIG. 2. Method 300 in FIG. 3 is one suitable example of a detailedmethod for step 270 in FIG. 2. Referring to FIG. 7, the availablehardware resources are 140. The array rates are as follows: 15 forArray1; 60 for Array2; 10 for Array3; and 30 for Array4. The Array Sumis thus 115. The Optimal Rate for each array is: 40 for Array1; 60 forArray2; 40 for Array3; and 40 for Array4. The Optimal Sum is thus 180.We assume for this example that Array1, Array2 and Array4 have data incache above the Minimum Data Threshold, but Array3 has data in cachebelow the Minimum Data Threshold. The Excess Sum is thus computed as theOptimal Rate for Array3 less the Array Rate for Array3, or 40−10=30. TheDesired Sum is the difference between the Optimal Rate and Array Ratefor Array1, Array2 and Array4, and is the Array Rate for Array3. Thus,Desired Sum=(40−15) +(60−60)+(40−30)+10=45. The available resources of140 is less than the Optimal Sum of 180, so step 230=NO in FIG. 2. Theavailable resources of 140 is greater than the Array Sum of 115, so step250=YES. We then go to step 270, one implementation of which is shown asmethod 300 in FIG. 3. The Remaining Resources in step 310 is calculatedas Available Resources minus the Array Sum, or 140−115, or 25. TheDesired Ratio is computed as the Remaining Resources divided by theDesired Sum, or 1, whichever is lower, or 25/45, which is less than 1,so the Desired Ratio is 0.556. Array1 is selected (step 314). The ArrayRate of 15 is less than the Global Rate of 40, so step 320=YES. Array1has data in cache greater than the Minimum Data Threshold so step330=NO. The product of the Array Delta is calculated in step 334 asGlobal Rate minus Array Rate multiplied by the desired ratio, or(40−15)* 0.556=13.9. The Desired Sum of 45 is greater than the TotalResources of 140 minus the Array Sum of 115 or 25, so step 340=NO. ArrayExtra is set to 0 in step 344. Finally, in step 360, the Destage Ratefor Array1 is set to the Array Rate of 15 plus the Array Delta of 13.9plus the Array Extra of 0, or 28.9.

There are more arrays to process (step 370=YES), so method 300 loopsback to step 314, where Array2 is selected. The Array Rate of 60 forArray2 is not less than the Global Rate of 60, so step 320=NO, and theArray Destage Rate for Array2 is set to the Array Rate of 60 in step322. There are more arrays to process (step 370=YES), so method 300loops back to step 314, where Array3 is selected. The Array Rate of 10for Array3 is less than the Global Rate for Array3, so step 320=YES. Thearray data in cache is less than the minimum data threshold (step330=YES), so the Array Delta is computed in step 332 as the Array Rateof 10 times the Desired Ratio of 0.556, or 5.56. The Desired Sum of 45is not less than the Total Resources of 140 less the Array Sum of 115,or 25, so step 340=NO. The Array Extra is set to zero in step 344. TheArray Destage Rate for Array3 is then set in step 360 to the Array Rateof 10 plus the Array Delta of 5.56 plus the Array Extra of 0, or 15.56.

There are more arrays to process (step 370=YES), so method 300 loopsback to step 314, where Array4 is selected. The Array Rate of 30 forArray4 is less than the Global Rate, so step 320=YES. The array data incache for Array4 is not less than the Minimum Data Threshold, so step330=NO. Array Delta for Array4 is computed in step 334 by taking theGlobal Rate of 40 and subtracting the Array Rate of 30 multiplied by theDesired Ratio of 0.556, or 5.56. The Desired Sum of 45 is not less thanthe (Total Resources of 140 less the Array Sum of 115), or 25, so step340=NO. The Array Extra is set to zero in step 344. The Array DestageRate for Array4 is then set to the Array Rate 30 plus the Array Delta5.56 plus the Array Extra 0, or 35.56. There are no more arrays toprocess (step 370=NO), so method 300 is done. Note the destage ratescomputed for Array1, Array2, Array3 and Array4 are then used whenwriting data from the cache to these storage arrays, as shown in step280 in FIG. 2.

The example above in FIG. 7 results in destage rates that are not wholenumbers. The destage rates for Array1, Array2, Array3 and Array4 are28.9, 60, 15.6 and 35.6, respectively. It is understood that it is notpossible to allocate a fractional hardware resource. Thus, these numbersmay be adjusted by suitable truncation or rounding to allocate hardwareresources in whole units. Thus, the destage rates of 28.9, 60, 15.6 and35.6 computed above in FIG. 7 could be adjusted to 29, 60, 15 and 36 toprovide whole numbers that equal the 140 available resources.

Referring to FIG. 8, the available hardware resources are 165. The arrayrates are as follows: 15 for Array1; 60 for Array2; 10 for Array3; and30 for Array4. The Array Sum is thus 115. The Optimal Rate for eacharray is: 40 for Array1; 60 for Array2; 40 for Array3; and 40 forArray4. The Optimal Sum is thus 180. We assume for this example thatArray1, Array2 and Array4 have data in cache above the Minimum DataThreshold, and that Array3 has data in cache below the Minimum DataThreshold. The Excess Sum is thus computed as the Optimal Rate forArray3 less the Array Rate for Array3, or 40−10=30. The Desired Sum isthe difference between the Optimal Rate and Array Rate for Array1,Array2 and Array4, and is the Array Rate for Array3. Thus, DesiredSum=(40−15)+(60−60)+(40−30)+10=45. The available resources of 165 isless than the Optimal Sum of 180, so step 230=NO in FIG. 2. Theavailable resources of 165 is greater than the Array Sum of 115, so step250=YES. We then go to step 270, one implementation of which is shown asmethod 300 in FIG. 3. The Remaining Resources in step 310 is calculatedas Available Resources minus the Array Sum, or 165−115, or 50. TheDesired Ratio is computed as the Remaining Resources divided by theDesired Sum, or 1, whichever is lower, or 50/45, which is greater than1, so the Desired Ratio is 1. Array1 is selected (step 314). The ArrayRate of 15 is less than the Global Rate of 40, so step 320=YES. Array1has data in cache less than the Minimum Data Threshold so step 330=NO.The product of the Array Delta is calculated as Global Rate minus ArrayRate multiplied by the desired ratio, or (40−15)* 1=25. The Desired Sumof 45 is less than the Total Resources of 165 minus the Array Sum of 115or 50, so step 340=YES. Array1 has data in cache that is not less thanthe minimum data threshold (step 342=N0), so Array Extra is set to 0 instep 344. Finally, in step 360, the Destage Rate for Array1 is set tothe Array Rate of 15 plus the Array Delta of 25 plus the Array Extra of0, or 40.

There are more arrays to process (step 370=YES), so method 300 loopsback to step 314, where Array2 is selected. The Array Rate of 60 forArray2 is not less than the Global Rate of 60, so step 320=NO, and theArray Destage Rate for Array2 is set to the Array Rate of 60 in step322. There are more arrays to process (step 370=YES), so method 300loops back to step 314, where Array3 is selected. The Array Rate of 10for Array3 is less than the Global Rate for Array3, so step 320=YES. Thearray data in cache is less than the minimum data threshold (step330=YES), so the Array Delta is computed in step 332 as the Array Rateof 10 times the Desired Ratio of 1, or 10. The Desired Sum of 45 is lessthan the Total Resources of 165 less the Array Sum of 115, or 50, sostep 340=YES. The array data in cache for Array3 is less than theMinimum Data Threshold, so step 342=YES. The Array Extra is thencomputed as the Total Resources of 165 less the Array Sum of 115 minusthe Desired Sum of 45, or 5, times (this Array Extra of 30 divided byExcess Sum of 30), for a total of 5 for the Array Extra. The ArrayDestage Rate for Array3 is then set in step 360 to the Array Rate of 10plus the Array Delta of 10 plus the Array Extra of 5, or 25.

There are more arrays to process (step 370=YES), so method 300 loopsback to step 314, where Array4 is selected. The Array Rate of 30 forArray4 is less than the Global Rate, so step 320=YES. The array data incache for Array4 is not less than the Minimum Data Threshold, so step330=NO. Array Delta for Array4 is computed in step 334 by taking theGlobal Rate of 40 and subtracting the Array Rate of 30 multiplied by theDesired Ratio of 1, or 10. The Desired Sum of 45 is less than the (TotalResources of 165 less the Array Sum of 115), or 50, so step 340=YES. Thedata in cache for Array4 is not less than the Minimum Data Threshold(step 342=NO), so the Array Extra is set to zero in step 344. The ArrayDestage Rate for Array4 is then set to the Array Rate 30 plus the ArrayDelta 10 plus the Array Extra 0, or 40. There are no more arrays toprocess (step 370=NO), so method 300 is done. Note the destage ratescomputed for Array1, Array2, Array3 and Array4 are then used whenwriting data from the cache to these storage arrays, as shown in step280 in FIG. 2.

The disclosure herein refers to “destage rates” in terms of a number ofallocated hardware resources. Thus, the destage rates disclosed andclaimed herein are not rates in the true sense, such as a number ofbytes per second. However, because the rate of destaging data from thewrite cache for an array is a function of the number of hardwareresources allocated to the array, the destage rates are discussed hereinas having numerical values corresponding to the number of hardwareresources allocated to each array.

The disclosure and claims herein support an apparatus comprising: atleast one processor; a write cache coupled to the at least one processorthat writes data to a plurality of storage arrays; a plurality ofavailable hardware resources; and a cache destage controller that sets adestage rate for each of the plurality of storage arrays as a functionof an array sum that is a sum of array rates for the plurality ofstorage arrays, an optimal sum that is a sum of optimal rates for theplurality of storage arrays, and the plurality of available hardwareresources, wherein when the plurality of available hardware resourcesexceeds the optimal sum, the cache destage controller sets the destagerate for each of the plurality of storage arrays to the optimal rate forthe storage array, wherein when the plurality of available hardwareresources is less than the array sum, the cache destage controller setsthe destage rate for each of the plurality of storage arrays to thearray sum multiplied by an array rate for the storage array divided bythe plurality of available hardware resources, wherein the cache destagecontroller destages data in the write cache to each of the plurality ofstorage arrays using the set destage rates for the plurality of storagearrays.

The disclosure and claims herein further support an apparatuscomprising: at least one processor; a write cache coupled to the atleast one processor that writes data to a plurality of storage arrays; aplurality of available hardware control blocks; and a cache destagecontroller that sets a destage rate for each of the plurality of storagearrays as a function of an array sum that is a sum of array rates forthe plurality of storage arrays, an optimal sum that is a sum of optimalrates for the plurality of storage arrays, and the plurality of hardwareresources, wherein when the plurality of available hardware resourcesexceeds the optimal sum, the cache destage controller sets the destagerate for each of the plurality of storage arrays to the optimal rate forthe storage array, wherein when the plurality of available hardwareresources is less than the array sum, the cache destage controller setsthe destage rate for each of the plurality of storage arrays to thearray sum multiplied by an array rate for the storage array divided bythe plurality of available hardware resources, wherein when theplurality of hardware resources does not exceed the optimal sum and theplurality of hardware resources is not less than the array sum, thecache destage controller computes remaining resources as the pluralityof hardware resources less the array sum and computes desired ratio asthe remaining resources divided by the desired sum, or 1, whichever islower, wherein the cache destage controller selects one of the pluralityof storage arrays, and when the array rate for the selected storagearray is not less than a global rate, the destage rate for the selectedstorage array is set to the array rate for the selected storage array,wherein when the array rate for the selected storage array is less thanthe global rate, and the data in cache for the selected storage array isless than a minimum data threshold, computing an array delta as thearray rate of the selected storage array times the desired ratio, andwhen the data in cache for the selected storage array is not less thanthe minimum data threshold, computing the array delta as the global rateless the array rate times the desired ratio, wherein when the desiredsum is less than the plurality of available hardware resources less thearray sum, and the data in cache for the selected array is below theminimum data threshold, computing an array extra for the selected arrayas the plurality of hardware resources less the array sum less thedesired sum, multiplied by the array extra divided by the extra sum,wherein when the desired sum is not less than the plurality of availablehardware resources less the array sum, setting the array extra to zero,and setting the array destage rate for the selected array to be thearray rate plus the array delta plus the array extra, wherein the cachedestage controller destages data in the write cache to each of theplurality of storage arrays using the set destage rates for theplurality of storage arrays.

The disclosure and claims herein additionally support a method fordestaging data from a write cache in a storage controller to a pluralityof storage arrays, the method comprising: providing a plurality ofavailable hardware resources; and setting a destage rate for each of theplurality of storage arrays as a function of an array sum that is a sumof array rates for the plurality of storage arrays, an optimal sum thatis a sum of optimal rates for the plurality of storage arrays, and theplurality of hardware resources, wherein when the plurality of availablehardware resources exceeds the optimal sum, setting the destage rate foreach of the plurality of storage arrays to the optimal rate for thestorage array, wherein when the plurality of available hardwareresources is less than the array sum, setting the destage rate for eachof the plurality of storage arrays to the array sum multiplied by anarray rate for the storage array divided by the plurality of availablehardware resources; and destaging data in the write cache to each of theplurality of storage arrays using the set destage rates for theplurality of storage arrays.

A storage controller includes a cache destage controller that determineswrite cache destage rates for each of a plurality of storage arrays as afunction of available system resources. When the available systemresources are sufficient to satisfy the optimal destage rates for allarrays, the destage rate for each array is set to its optimal rate. Whenthe available system resources are insufficient to satisfy the arrayrates of all of the arrays, each array is allocated destage rate that isa percentage of the array rates based on the available resources. Whenthe available system resources are insufficient to satisfy the optimaldestage rates for all arrays, but sufficient to satisfy the array ratesof some of the arrays, a destage rate is determined for each array basedon mathematical relationships between sums of the array rates, globalrates, optimal rates, and sums of these across arrays. If an array hasvery little data in cache, such that a larger destage rate would beuseless, the array is said to be below a minimum data threshold. Theminimum data threshold is used to otherwise reduce a destage rate to anarray that does not meet the minimum data threshold, thereby reducingthe system resources used by that array and making these systemresources available to other arrays.

One skilled in the art will appreciate that many variations are possiblewithin the scope of the claims. Thus, while the disclosure isparticularly shown and described above, it will be understood by thoseskilled in the art that these and other changes in form and details maybe made therein without departing from the spirit and scope of theclaims.

1. An apparatus comprising: at least one processor; a write cachecoupled to the at least one processor that writes data to a plurality ofstorage arrays; a plurality of available hardware resources; and a cachedestage controller that sets a destage rate for each of the plurality ofstorage arrays as a function of an array sum that is a sum of arrayrates that represent current destage rates for the plurality of storagearrays, an optimal sum that is a sum of optimal rates for the pluralityof storage arrays, and the plurality of available hardware resources,wherein when the plurality of available hardware resources exceeds theoptimal sum, the cache destage controller sets the destage rate for eachof the plurality of storage arrays to the optimal rate for the storagearray, wherein when the plurality of available hardware resources isless than the array sum, the cache destage controller sets the destagerate for each of the plurality of storage arrays to the plurality ofavailable hardware resources divided by the array sum and multiplied byan array rate for the storage array, wherein the cache destagecontroller destages data in the write cache to each of the plurality ofstorage arrays using the set destage rates for the plurality of storagearrays, wherein when the plurality of hardware resources does not exceedthe optimal sum and the plurality of hardware resources is not less thanthe array sum, the cache destage controller computes remaining resourcesas the plurality of hardware resources minus the array sum and computesdesired ratio as the remaining resources divided by a desired sum, or 1,whichever is lower, wherein the cache destage controller selects one ofthe plurality of storage arrays, and when the array rate for theselected storage array is not less than a global rate that addressesfullness of the write cache, the destage rate for the selected storagearray is set to the array rate for the selected storage array.
 2. Theapparatus of claim 1 wherein the plurality of hardware resourcescomprise hardware control blocks.
 3. (canceled)
 4. The apparatus ofclaim 1 wherein when the array rate for the selected storage array isless than the global rate, and the data in cache for the selectedstorage array is less than a minimum data threshold, computing an arraydelta as the array rate of the selected storage array times the desiredratio, and when the data in cache for the selected storage array is notless than the minimum data threshold, computing the array delta as theglobal rate minus the array rate times the desired ratio. 5-7.(canceled)
 8. A method for destaging data from a write cache in astorage controller to a plurality of storage arrays, the methodcomprising: providing a plurality of available hardware resources; andsetting a destage rate for each of the plurality of storage arrays as afunction of an array sum that is a sum of array rates that representcurrent destage rates for the plurality of storage arrays, an optimalsum that is a sum of optimal rates for the plurality of storage arrays,and the plurality of hardware resources, wherein when the plurality ofavailable hardware resources exceeds the optimal sum, setting thedestage rate for each of the plurality of storage arrays to the optimalrate for the storage array, wherein when the plurality of availablehardware resources is less than the array sum, setting the destage ratefor each of the plurality of storage arrays to the plurality ofavailable hardware resources divided by the array sum and multiplied byan array rate for the storage array, wherein when the plurality ofhardware resources does not exceed the optimal sum and the plurality ofhardware resources is not less than the array sum, computing remainingresources as the plurality of hardware resources minus the array sum andcomputing desired ratio as the remaining resources divided by a desiredsum, or 1, whichever is lower, further comprising selecting one of theplurality of storage arrays, and when the array rate for the selectedstorage array is not less than a global rate that addresses fullness ofthe write cache, the destage rate for the selected storage array is setto the array rate for the selected storage array; and destaging data inthe write cache to each of the plurality of storage arrays using the setdestage rates for the plurality of storage arrays.
 9. The method ofclaim 8 wherein the plurality of hardware resources comprise hardwarecontrol blocks.
 10. (canceled)
 11. The method of claim 8 wherein whenthe array rate for the selected storage array is less than the globalrate, and the data in cache for the selected storage array is less thana minimum data threshold, computing an array delta as the array rate ofthe selected storage array times the desired ratio, and when the data incache for the selected storage array is not less than the minimum datathreshold, computing the array delta as the global rate minus the arrayrate times the desired ratio. 12-13. (canceled)